package com.baosight.risk.common.quartz;

import com.baosight.risk.api.quartz.ISysSyncEmpleeService;
import com.baosight.risk.api.quartz.ISysSyncOrgService;
import com.baosight.risk.service.xtzy.entity.XtzyCompany;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author cuishihao
 * <p>
 * 定时任务
 * 同步组织
 */
@Slf4j
@Component("syncOrgTask")
public class SyncOrgTask {

    @Autowired
    ISysSyncOrgService orgService;

    public void testParams(String params, String jobId) throws Exception {
        log.info("进入调用方法:同步组织");
        // 获取组织数据
//        orgService.getOrgFromOtherDB(params, jobId);
        orgService.doUpgradeOrg(params, jobId);
        log.info("结束调用方法:同步组织");
    }

    public void testNoParams() {
        log.error("执行无参方法");
    }
}
